`:top
`!JavaScript Style Sheets`! (`!JSSS`!) was a `F33f`_`[stylesheet language`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Stylesheet_language]`_`f technology proposed by `F33f`_`[Netscape Communications`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Netscape]`_`f in 1996 to provide facilities for defining the presentation of `F33f`_`[webpages`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Webpages]`_`f.`:cite-ref-chapter20-1-0[`F5bf`_`[1`#cite-note-chapter20-1]`_`f] It was an alternative to the `F33f`_`[Cascading Style Sheets`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Cascading_Style_Sheets]`_`f (CSS) technology.`:cite-ref-chapter20-1-1[`F5bf`_`[1`#cite-note-chapter20-1]`_`f]
Although Netscape submitted it to the `F33f`_`[World Wide Web Consortium`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=World_Wide_Web_Consortium]`_`f (W3C), the technology was never accepted as a formal standard and it never gained acceptance in the `F33f`_`[web browser`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Web_browser]`_`f market. Only `F33f`_`[Netscape Communicator`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Netscape_Communicator]`_`f 4 implemented JSSS, with rival `F33f`_`[Internet Explorer`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Internet_Explorer]`_`f choosing not to implement the technology. Soon after Netscape Communicator's release in 1997, Netscape stopped promoting JSSS, instead focusing on the rival CSS standard, which was also supported by Internet Explorer and had a much wider industry acceptance.
The follow-up to Netscape Communicator, `F33f`_`[Netscape 6`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Netscape_6]`_`f (released in 2000), dropped support for JSSS. It now remains little more than a historical footnote, with `F33f`_`[web developers`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Web_development]`_`f generally unaware of its previous existence. The proposal did not become a W3C standard.
>>Contents
• `F0af`_`[Syntax`#syntax]`_`f
• `F0af`_`[Example`#example]`_`f
• `F0af`_`[Browser support`#browser-support]`_`f
• `F0af`_`[References`#references]`_`f
• `F0af`_`[External links`#external-links]`_`f
-─
>>Syntax
Using `F33f`_`[JavaScript`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=JavaScript]`_`f code as a stylesheet, JSSS styles individual element by modifying properties of a `B100`F9d9document.tags`f`b object. For example, the CSS:
`B100`F9d9 h1 { font-size: 20pt; }`f`b
is equivalent to the JSSS:
`B100`F9d9 document.tags.H1.fontSize = "20pt";`f`b
JSSS element names are case sensitive.
JSSS lacks the various CSS selector features, supporting only simple tag name, class and id selectors. On the other hand, since it is written using a complete `F33f`_`[programming language`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Programming_language]`_`f, stylesheets can include highly complex dynamic calculations and conditional processing. (In practice, however, this can be achieved using `F33f`_`[JavaScript`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=JavaScript]`_`f to modify the stylesheets applicable to the document at runtime.) Because of this JSSS was often used in the creation of `F33f`_`[dynamic web pages`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Dynamic_web_page]`_`f.
>>>Example
The following example shows part of the source code of an HTML document:
`B100`F9d9<style type="text/javascript">`f`b
`B100`F9d9tags.H1.color = "red";`f`b
`B100`F9d9tags.p.fontSize = "20pt";`f`b
`B100`F9d9`f`b
`B100`F9d9with (tags.H3) {`f`b
`B100`F9d9 color = "green";`f`b
`B100`F9d9}`f`b
`B100`F9d9with (tags.H2) {`f`b
`B100`F9d9 color = "red";`f`b
`B100`F9d9 fontSize = "16pt";`f`b
`B100`F9d9 marginTop = "4cm";`f`b
`B100`F9d9}`f`b
`B100`F9d9</style>`f`b
Similar to `F33f`_`[Cascading Style Sheets`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Cascading_Style_Sheets]`_`f, JSSS could be used in a `B100`F9d9<style>`f`b tag. This example shows two different methods to select tags.
>>Browser support
Javascript Style Sheets were only supported by Netscape 4.x (4.0–4.8) but no later versions. No other `F33f`_`[web browser`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Web_browser]`_`f has ever implemented JSSS.
>>References
`:cite-note-chapter20-1`!1.`! `F0af`_`[↑`#cite-ref-chapter20-1-0]`_`f `:citerefh-kon-wium-liebert-bos`a`F33f`_`[Håkon Wium Lie`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Håkon_Wium_Lie]`_`f; `F33f`_`[Bert Bos`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Bert_Bos]`_`f. "Chapter 20 - The CSS saga". `F33f`_`[World Wide Web Consortium`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=World_Wide_Web_Consortium]`_`f. Retrieved 23 June 2010.
>>External links
• Netscape's JavaScript-Based Style Sheets submission to the W3C
• The dynamic, powerful abilities of JavaScript Style Sheets
• JavaScript Style Sheet Reference
`c`F0af`_`[↑ Back to top`#top]`_`f`a